﻿using System;
using NServiceBus;

namespace MyMessages
{
    /* Truncates the Saga tables in the database to refresh the state of the database */
    [Serializable]
    public class RefreshSagaMessage : IMessage { }

    /* Starts a new Saga */
    [Serializable]
    public class BeginSagaMessage : IMessage
    {
        public int ProcessId { get; set; }
        public DateTime? BeginDate { get; set; }
    }

    /* Continues a saga by adding smoe more contextual information around the saga */
    [Serializable]
    public class ContinueSagaMessage : IMessage
    {
        public int ProcessId { get; set; }
        public int SomeMoreInformation { get; set; }
        public string SomeMoreInformation2 { get; set; }
    }

    /* Ends a Saga */
    [Serializable]
    public class EndSagaMessage : IMessage
    {
        public int ProcessId { get; set; }
        public DateTime? EndDate { get; set; }
        public string CompletionMessage { get; set; }
    }
}
